<#assign x = "<test>">

<#compress>
	<#escape x as x?html>
		${x}
	</#escape>
</#compress>

==================================================
<#compress>
	<#macro m1>
		m1: ${x}
	</#macro>
	<@m1/>
	
	<#escape x as x?html>
		<#macro m2>
			m2: ${x}
		</#macro>
	</#escape>
	<@m2/>
	
	<#macro m3>
		<#escape x as x?html>
			m3: ${x}
		</#escape>
	</#macro>
	<@m3/>
</#compress>